<template>
<div class="layerRtb layerRtb-threecolumn">
    <three-title :title="{name:'字符串类'}"></three-title>
    <div class="layerRtb-scroll thinScroll" v-scrollHeight = "0">
        <div class="analyItem">
            <p class="analyItemTit tx-center">字符串</p>
            <div class="analyItemCon">
                <p class="col-md-4"><span class="cLightGray pr8">truncate截取</span><span title="截取5个文字,剩下的省略号显示">{{ characters | truncate(5) }}</span></p>
                <p class="col-md-4"><span class="cLightGray pr8">slice截取</span><span title="截取从下标为5开始,到下标9结束之间的内容,包含下标为5内容,不包含下标为9的内容">{{ characters | slice(5,9) }}</span></p>
                <div class="cRed col-md-12">鼠标引入文字观看提示</div>
            </div>
        </div>
        <codemd url="Lesson3/docs/string.md"></codemd>
    </div>
</div>
</template>
<script>
import codemd from '../code-md'
export default {
    components: {
        codemd
    },
    data () {
        return {
            characters: '这是文字内容,写多一写方便观看效果'
        }
    },
    mounted () {

    },
    methods: {

    }
}
</script>
